// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space 
// Source File Name:   PageBean.java

package com.itheima.travel.model;

import java.io.Serializable;
import java.util.List;

public class PageBean
	implements Serializable
{

	private List data;
	private int firstPage;
	private int prePage;
	private int curPage;
	private int nextPage;
	private int totalPage;
	private int count;
	private int pageSize;

	public List getData()
	{
		return data;
	}

	public void setData(List data)
	{
		this.data = data;
	}

	public int getFirstPage()
	{
		return firstPage;
	}

	public void setFirstPage(int firstPage)
	{
		this.firstPage = firstPage;
	}

	public int getPrePage()
	{
		prePage = curPage - 1;
		return prePage;
	}

	public void setPrePage(int prePage)
	{
		this.prePage = prePage;
	}

	public int getCurPage()
	{
		return curPage;
	}

	public void setCurPage(int curPage)
	{
		this.curPage = curPage;
	}

	public int getNextPage()
	{
		nextPage = curPage + 1;
		return nextPage;
	}

	public void setNextPage(int nextPage)
	{
		this.nextPage = nextPage;
	}

	public int getTotalPage()
	{
		totalPage = count % pageSize != 0 ? count / pageSize + 1 : count / pageSize;
		return totalPage;
	}

	public void setTotalPage(int totalPage)
	{
		this.totalPage = totalPage;
	}

	public int getCount()
	{
		return count;
	}

	public void setCount(int count)
	{
		this.count = count;
	}

	public int getPageSize()
	{
		return pageSize;
	}

	public void setPageSize(int pageSize)
	{
		this.pageSize = pageSize;
	}

	public PageBean()
	{
		firstPage = 1;
	}

	public PageBean(List data, int firstPage, int prePage, int curPage, int nextPage, int totalPage, int count, 
			int pageSize)
	{
		this.firstPage = 1;
		this.data = data;
		this.firstPage = firstPage;
		this.prePage = prePage;
		this.curPage = curPage;
		this.nextPage = nextPage;
		this.totalPage = totalPage;
		this.count = count;
		this.pageSize = pageSize;
	}
}
